The storage required for a DECIMAL data type is potentially much larger than it is for a normal floating-point data type. DECIMAL数据类型需要的存储空间通常要比浮点数据类型大得多。
A more general synonym is the FLOAT type, which has an arbitrary floating-point precision that you specify when declaring the data type as FLOAT ( val). 更常用的同义词是FLOAT类型,它拥有任意的浮点精度,可以在声明数据类型时指定,例如FLOAT(val)。
If you want to force a floating-point result, be sure that at least one of the operands is a floating-point type. 如果要强制取得浮点结果,则必须确保操作数中至少有一个为浮点类型。
If you've never encountered an exact precision data type, the distinction between a decimal and floating-point type may be confusing. 如果从未遇到过准确精度数据类型,那么对算术类型和浮点类型可能有些迷惑。
Any value of a floating-point type may be cast to or from any numeric type. 一个浮点类型的任何值可以被转换或者转换为任何数值类型。
The Design of a C++ Over-long Floating-point Data Type and Accurate Calculation of π C++超长浮点类的设计及π的精确计算
The traditional image compression based on wavelet transform coding, wavelet transform coefficients are floating-point type, and the process of quantify inevitably produces different degrees of distortion because of computer rounding errors of floating point operations, so it cannot be directly used for lossless image restructure. 传统的基于小波变换的图像压缩编码中,变换后的小波系数是浮点型的,量化过程中由于计算机的浮点舍入误差运算必然产生不同程度的失真,因此不能直接用于图像的无损重构。